//=============================================================================
//D <One line description>
//
// <Details of class and its usage from code/internal viewpoint>
//
// ----------------------------------------------------------------------------
// Copyright 2013 Delcam plc., Birmingham, UK
// ----------------------------------------------------------------------------
//
// History.
// DICC   Who When     What   
// ------ --- -------- --------------------------------------------------------
// 999999 CLH 28/06/13 Written.
//-----------------------------------------------------------------------------
#include "stdafx.h"

#include "cpp/cppAutoKeyword.h"

// additional includes from 'cpp' library
// includes from PowerINSPECT libraries
// includes from Delcam libraries
#include "utils/ut_assert.h"   // Use assertions!
// includes from other libraries
// system includes
#include <memory>

// types: classes, enums, typedefs

// variables: consts, statics, exported variables (declared extern elsewhere)
// local forward function declarations

#if 0
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#endif

//=============================================================================
cppAutoKeyword::cppAutoKeyword()
//
//D Default constructor.
//
// History.
// DICC   Who When     What   
// ------ --- -------- --------------------------------------------------------
// 999999 CLH 28/06/13 Written.
//-----------------------------------------------------------------------------
{
  UT_CHECKVALID_CLASS;
}

//=============================================================================
cppAutoKeyword::cppAutoKeyword(const cppAutoKeyword& )
//
//D Default constructor.
//
// History.
// DICC   Who When     What   
// ------ --- -------- --------------------------------------------------------
// 999999 CLH 28/06/13 Written.
//-----------------------------------------------------------------------------
{
  UT_CHECKVALID_CLASS;

  printf("Copy constructor called\r\n");
}

//=============================================================================
cppAutoKeyword::~cppAutoKeyword()
//
//D Destructor.
//
// History.
// DICC   Who When     What   
// ------ --- -------- --------------------------------------------------------
// 999999 CLH 28/06/13 Written.
//-----------------------------------------------------------------------------
{
  UT_CHECKVALID_CLASS;
}

//=============================================================================
cppAutoKeyword& cppAutoKeyword::operator=(const cppAutoKeyword& )
//
//D Assignment operator
//
// History.
// DICC   Who When     What   
// ------ --- -------- --------------------------------------------------------
// 999999 CLH 28/06/13 Written.
//-----------------------------------------------------------------------------
{
  UT_CHECKVALID_CLASS;

  printf("Assignment called\r\n");

  return *this;
}

//=============================================================================
const cppAutoKeyword& cppAutoKeyword::get() const
//
//D Gets a const ref
//
// History.
// DICC   Who When     What   
// ------ --- -------- --------------------------------------------------------
// 999999 CLH 28/06/13 Written.
//-----------------------------------------------------------------------------
{
  UT_CHECKVALID_CLASS;
  return *this;
}

//=============================================================================
void cppAutoKeyword::run()
//
//D Runs
//
// History.
// DICC   Who When     What   
// ------ --- -------- --------------------------------------------------------
// 999999 CLH 28/06/13 Written.
//-----------------------------------------------------------------------------
{
  UT_CHECKVALID_CLASS;

  printf("Making\r\n");
  auto thing = get();

  printf("Made\r\n");
  
  printf("Making2\r\n");
  auto & thing2 = get();

  printf("Made\r\n");
  // thing2.none_const();
}
